﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using WebBags;

namespace WebBags.Controllers
{
    [HandleError]
    public class HomeController : Controller
    {
        private DBWebBagsDataContext db = new DBWebBagsDataContext();

        public ActionResult Index()
        {
            string forwardUrl = Request.Params["currentUrl"];
            if (forwardUrl != null)
            {
                string lang = Request.Params["lang"];
                if (lang == null) lang = "vi-VN";
                Session["userCultureInfo"] = lang;
                return Redirect(forwardUrl);
            }
            else
                return View();
        }

        public ActionResult About()
        {
            return View();
        }

        public ActionResult Contact()
        {
            return View();
        }
    }
}
